package com.xmy.cultivate.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.xmy.cultivate.entity.EnrollCustomer;
import com.xmy.cultivate.entity.Student;
import com.xmy.cultivate.mapper.EnrollCustomerMapper;
import com.xmy.cultivate.service.IEnrollCustomerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 客户列表 服务实现类
 * </p>
 *
 * @author hpiggy
 * @since 2024-03-20
 */
@Service
public class EnrollCustomerServiceImpl extends ServiceImpl<EnrollCustomerMapper, EnrollCustomer> implements IEnrollCustomerService {

    @Override
    public boolean applyEnrollData(Student student){
        UpdateWrapper<EnrollCustomer> updateWrapper = new UpdateWrapper<>();
        updateWrapper.eq("phone", student.getLinkmanPhone());
        updateWrapper.set("status", 4);
        this.update(updateWrapper);
        return true;
    }
}
